import flickrapi
api_key = 'eac7e7fcb5aed451e7b49622f01d8965'
secret = '4f7faa3d166c0445'
flickr = flickrapi.FlickrAPI(api_key, secret)
p = flickr.photos_getSizes(photo_id='4000000011')
print p.attrib['stat']
ps = p.find('sizes')
pss = ps.getiterator('size')
for s in pss:
    if s.attrib['label']=='Medium':
        print s.attrib['source']
        print s.attrib['label']
        print s.attrib['width']
        print s.attrib['height']




